<!-- 导航栏 -->
<nav class="navbar navbar-custom navbar-fixed-top" role="navigation" style="color: black">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
                <i class="fa fa-bars"></i>
            </button>
            <a class="navbar-brand page-scroll" href="index.php">
                租车服务
            </a>
        </div>

        <!-- 员工登录状态下的导航 -->
        <?php
        if (isset($_SESSION['login_client'])) {
        ?>
            <div class="collapse navbar-collapse navbar-right navbar-main-collapse">
                <ul class="nav navbar-nav">
                    <li>
                        <a href="index.php">首页</a>
                    </li>
                    <li>
                        <a href="#"><span class="glyphicon glyphicon-user"></span> 欢迎 <?php echo $_SESSION['login_client']; ?></a>
                    </li>
                    <li>
                        <ul class="nav navbar-nav navbar-right">
                            <li><a href="#" class="dropdown-toggle active" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                    <span class="glyphicon glyphicon-user"></span> 控制面板 <span class="caret"></span>
                                </a>
                                <ul class="dropdown-menu">
                                    <li> <a href="entercar.php">添加车辆</a></li>
                                    <li> <a href="enterdriver.php"> 添加司机</a></li>
                                    <li> <a href="clientview.php">查看</a></li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <a href="logout.php"><span class="glyphicon glyphicon-log-out"></span> 注销</a>
                    </li>
                </ul>
            </div>

            <!-- 客户登录状态下的导航 -->
        <?php
        } else if (isset($_SESSION['login_customer'])) {
        ?>
            <div class="collapse navbar-collapse navbar-right navbar-main-collapse">
                <ul class="nav navbar-nav">
                    <li>
                        <a href="index.php">首页</a>
                    </li>
                    <li>
                        <a href="#"><span class="glyphicon glyphicon-user"></span> 欢迎 <?php echo $_SESSION['login_customer']; ?></a>
                    </li>
                    <ul class="nav navbar-nav">
                        <li><a href="#" class="dropdown-toggle active" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                车库 <span class="caret"></span>
                            </a>
                            <ul class="dropdown-menu">
                                <li> <a href="prereturncar.php">立即还车</a></li>
                                <li> <a href="mybookings.php"> 我的预订</a></li>
                            </ul>
                        </li>
                    </ul>
                    <li>
                        <a href="logout.php"><span class="glyphicon glyphicon-log-out"></span> 注销</a>
                    </li>
                </ul>
            </div>

            <!-- 未登录状态下的导航 -->
        <?php
        } else {
        ?>
            <div class="collapse navbar-collapse navbar-right navbar-main-collapse">
                <ul class="nav navbar-nav">
                    <li>
                        <a href="index.php">首页</a>
                    </li>
                    <li>
                        <a href="clientlogin.php">员工登录</a>
                    </li>
                    <li>
                        <a href="customerlogin.php">客户登录</a>
                    </li>

                </ul>
            </div>
        <?php   }
        ?>
    </div>
</nav>